







function writeFile (str, type, filename) 
    file = io.open("./hack/raw/"..(filename or "tmp"), type)  -- w+ a
    file:write(str)
    file:close()
end

function count_this(to_be_counted)
    local count = -1
    local var1 = ""
    while var1 ~= nil do
        count = count + 1
        var1 = (to_be_counted[count])
    end
    count=count-1
    return count
end


local count_max = count_this(df.job_skill)
local i
filestr = ""
for i=0, count_max do
    str = "'"..df.job_skill.attrs[i].caption.."' "..df.job_skill[i].." Type: "..df.job_skill_class[df.job_skill.attrs[i].type].."\n"
    filestr = filestr..str
end

writeFile(filestr, 'w+', "joblist.js")
